Developer --> Technical Publications
PATH Hardware Documentation > Device Managers and Drivers > ATA Devices > ATA Device Software Guide


ATA Disk Driver

The ATA disk driver has the following features:

The ATA disk driver supports all ATA drives that adhere to the ANSI ATA-2 and ATA-3 specifications.

The ATA disk driver relies on the services of the ATA Manager, which provides the ATA protocol engine and relieves the driver of system and bus dependencies. The main functions of the driver are managing the media and monitoring the status of the drive.

The ATA disk driver is responsible for providing block-oriented access to the storage media. The file systems treat the media as one or more logical partitions or volumes in which data at any address can be read or written indefinitely.

The ATA disk driver provides operating system-dependent services through a set of driver routines required to interface with the Macintosh Operating System. In addition, it provides additional control and status functions that are specific to this implementation of the ATA disk driver. The required disk driver routines, as specified in Inside Macintosh: Devices , are open , close , prime , control , and status .

There are two versions of the ATA disk driver, a RAM-based version which is installed on the drive media by the Drive Setup application, and a ROM-resident version. At system startup time, if a RAM-based driver is not found on the ATA drive media by the ATA Manager, the ATA disk driver in the ROM is selected as the driver for the drive. Note that this is different from the SCSI driver loading sequence, which always requires a RAM-based driver be installed on the media. The ATA disk driver in ROM is a subset of the ATA disk driver on the media and should not be used for normal operation. It provides emergency access to the ATA drive. The ATA disk driver installed on the media by the Drive Setup application provides the latest features and optimal performance.

The RAM-based ATA disk driver supports all modes of PIO and DMA operations as defined in the ANSI ATA-2 and ATA-3 Specifications. When the driver is opened for an ATA drive, the ATA disk driver configures the ATA Manager and the drive for optimal performance based upon both the system and drive capabilities. Typically, DMA modes are selected over PIO modes.

The ATA disk driver supports conservation of system power by spinning down the disk drive to reduce power consumption. Spinning down the drive also flushes the drive write cache to prevent data loss. The ATA disk driver spins down the disk drive in response to a Sleep demand, the "Set Power Mode" control call (csCode 70), system shutdown and restart, and when no access has been made to the drive within the time specified in the Energy Saver Control Panel.

The ATA disk driver usually has a driver reference number of -54 (decimal), but may also have a different reference number if -54 is taken when the driver is loaded. The driver name is .ATADisk . Like all Macintosh device drivers, the ATA disk driver can be called by using either the driver reference number or the driver name .ATADisk .

Note
You should never rely on the reference number being the same. Use the openDriver call with the driver name to retrieve the current reference number for that driver. Then use the driver reference number returned by the OpenDriver call for all subsequent driver calls.

The ATA disk driver does not provide request queuing. All driver requests are either completed immediately or are passed to the ATA Manager for further processing. However, the driver does process asynchronous requests using the ATA Manager to notify it when an operation has completed.


© 1999 Apple Computer, Inc. — (Last Updated 30 Oct 97)

Previous | Back Up One Level | Next | Show Frames | Hide Frames